/* General Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

/* Navigation Bar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: gray;
    padding: 10px 20px;
    color: white;
    position: sticky;
    top: 0;
}

.logo {
    font-size: 24px;
    font-weight: bold;
}

/* Menu Styling */
.menu {
    list-style: none;
    display: flex;
    gap: 20px;
}

.menu li {
    transition: transform 0.3s ease-in-out;
}

.menu li:hover {
    transform: scale(1.1);
}

.menu a {
    text-decoration: none;
    color: white;
    font-size: 18px;
}

/* Mobile Menu */
.menu-toggle {
    width: 30px;
    height: 25px;
    position: relative;
    cursor: pointer;
    border: none;
    background: none;
    display: none;
}

.bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: white;
    margin: 5px 0;
    transition: 0.4s;
}

.menu-toggle.active .bar:nth-child(1) {
    transform:rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity:0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Responsive */
@media (max-width: 900px) {
    /* Inside @media (max-width: 930px) */
    .menu {
        flex-direction: column;
        position: fixed; /* Changed from absolute to fixed so it stays on screen */
        top: 20px;       /* Adjust this if your navbar height changes */
        left: 0;
        width: 100%;
        background: gray;
        text-align: center;
        display: none;
        padding: 10px 0;
      
        /* NEW LINES FOR SCROLLING */
        max-height: calc(100vh - 60px); /* Limits height to screen size minus navbar */
        overflow-y: auto;               /* Adds scrollbar if menu items are too long */
        box-shadow: 0px 10px 10px rgba(0,0,0,0.5); /* Optional: Adds shadow for depth */
      }

    .menu li {
        padding: 10px 0;
    }

    .menu-toggle {
        width: 30px;
        height: 25px;
        position: relative;
        cursor: pointer;
        border: none;
        background: none;
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .menu.show {
        display: flex;
        animation: slideIn 0.5s ease-in-out;
    }

    .menu.hide {
        display: flex;
        animation: slideOut 0.5s ease-in-out;
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.menu.hide li {
    animation: fadeOutUp 0.5s forwards;
}

@keyframes fadeOutUp {
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#footer {
    padding: .5em;
    font-family: Comic Sans;
    background-color: rgb(192, 192, 192, .5);
    border-radius: 1em;
}